package com.mujin.keji.collectionsystem;

import android.os.Environment;

/**
 * 全局常量
 *
 * @author weishixiong
 * @Time 2018-03-16
 */

public class Constant {

    public static  Long visitId = 0l;
    /**
     * 请求后台的所有API接口都在这里配置;统一管理
     */
    public static class Server {
        //是否调到了权限的界面
        public static boolean isToPerssionActivity = false;
        //是否已经跳出重新登录界面
        public static boolean isRelogin = false;
        //是否是登录请求
        public static boolean isLoginRequest = false;
        //成功返回码
        public final static int SUCCESS_CODE = 0;
        //其他地方登陆返回码
        public final static int OTHER_LOGIN = 61020;
        //下线返回码
        public final static int OFFLINE_CODE = 61019;
        //主动退出登录
        public final static int I_LOGOUT = 10001;

        //服务器超时时间 16 秒
        public final static int TIME_OUT = 60;


//        //登陆服务器ip和端口
//         public static final String ROOT_URL = "http://"+ Param.IP+ ":" + Param.PORT+"/";
        public static final String ROOT_URL = "https://10.60.168.41/api/";
       // public static final String ROOT_URL = "https://10.60.168.41/api/";

        //登陆服务器系统
        public static final String platform="android";

        //登陆服务器商户ID
        public static final long merchantId=1000000;

        //登陆催收系统session
        public static final String session="";

    }

    /**
     * 全局静态变量
     */
    public static class Param {
       // public static String IP = "192.168.10.138";


        //外网


//       public static String IP = "121.46.31.89";

        //内网

         public static String IP = "192.168.10.17";


        //阿里
       //  public static String IP = "39.108.60.233";
        /**
         * 正式环境IP
         */
//        public static String IP =  "10.60.168. 21";
//
//        public static String PORT = "443";

        public static String PORT = "8001";

        //录音文件所在目录
        public static final String RECORDPATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/aarecordings";

    }

    /**
     * sp 常量
     */
    public static class SP {
        public static final String CONSTANT = "constant";//全局sp
        public static final String SP = "sp";//sp
        public static final String LOGIN_KEY = "login_key";//登录实体key
        public static final String SESSION_ID = "session_id";//
        public static final String ISCOMIN = "is_comin";//是否进入过APP
        public static final String USER = "user";//用户名
        public static final String USER_SP = "user_sp";//用户名sp

        public static final String SHOW_TIP_SP = "show_tip_sp";//是否提示对话框 外访的时候

        public static final String SHOW_TIP = "show_tip";//是否提示对话框 外访的时候

        public static final String SHOW_GUIDE_SP = "show_guide_sp";//是否提示引导

        public static final String SHOW_GUIDE = "show_guide";//是否提示引导
    }

    /**
     * intent 常量
     */
    public static class INTENT {
        public static final String ISSELECTCENTER = "isSelectCenter";//是否是选中中间的页面
    }

    /**
     * 全局常量
     */
    public static class FINALVALUE {
        public static final String LOCATION_MESSAGE = "未获取到位置信息权限，无法正常使用外访助手，请在应用权限管理中打开定位权限";
        public static final String CAMERA_MESSAGE = "未获取到手机相机权限，无法正常使用外访助手，请在应用权限管理中打开相机权限";
        public static final String EXTERNAL_MESSAGE = "未获取到存储文件或者照片权限，无法正常使用外访助手，请在应用权限管理中打开存储权限";
        public static final String RECORD_MESSAGE = "未获取到手机录音权限，无法正常使用外访助手，请在应用权限管理中打开录音权限";
        public static final String PHONE_MESSAGE = "未获取到电话权限，无法正常使用外访助手，请在应用权限管理中打开电话权限";
        public static final String NO_DATA = "空";

        //https
        //信任证书密码，
        // .5和阿里环境 密码是 123456
        // 正式环境  密码是  214766866400633
        public static  final String CLIENT_TRUST_PASSWORD = "123456";
        public static   final String CLIENT_AGREEMENT = "TLS";//使用协议
        //.5和阿里环境是 bks
        //正式环境是 pkcs12
        public static  final String CLIENT_TRUST_KEYSTORE = "bks";//bks pkcs12
        //证书
        public static final int CERTIFICATE = R.raw.point_five;
    }
}
